//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package test;

import java.util.*;

public class test5 {
	public static void main(String[] args) {
		int[] a = {1, 4, 6, 7, 8, 9, 4, 1, 2, 3};
		Set<Integer> set = new TreeSet<>();
		for (int i = 0; i < a.length; i++) {
			boolean add = set.add(a[i]);
			if (!add) {
				//  如果添加不进去
				System.out.println(set.remove(a[i]));
			}
		}
		List<List<Integer>> res = new ArrayList<List<Integer>>();
		
		List<Integer> alist = new ArrayList<>(set);
		
		for (int i = 0, j = 11; i < 10; i++, j--) {
		
		}
		
	}
}

